﻿@model IEnumerable<DealKhuyenMaiV2.com.Models.Catalogy>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Admin/Shared/_AdminLayout.cshtml";
}
<div class="breadcrumb">
    @Html.ActionLink("Trang Chủ", "Index", "Admin")
</div>
<div class="box">
    <div class="left">
    </div>
    <div class="right">
    </div>
    <div class="heading">
        <h1 style="background-image: url(../../ContentAdmin/DefaultThemes/image/home.png);">
            Quản lý danh mục</h1>
        <div class="buttons">
            <a  href="@Url.Action("Create")" class="button"><span>Thêm</span></a>
        </div>
    </div>
    <div class="content">
        <table class="list">
            <thead>
                <tr>
                    <td class="left">
                        NameCatalogy
                    </td>
                    <td>
                        Image
                    </td>
                    <td class="left">
                        IDParent
                    </td>
                    <td class="left">
                        DateAdded
                    </td>
                    <td class="left">
                        DateModified
                    </td>
                    <td class="left">
                        Status
                    </td>
                    <td class="left">
                        SortOrder
                    </td>
                    <td class="left">
                        Description
                    </td>
                    <td>
                    </td>
                </tr>
            </thead>
            @foreach (var item in Model)
            {
                <tr>
                    <td class="left">
                        @Html.DisplayFor(modelItem => item.NameCatalogy)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Image)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.IDParent)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.DateAdded)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.DateModified)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Status)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.SortOrder)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Description)
                    </td>
                    <td>
                        @Html.ActionLink("Edit", "Edit", new { id = item.IDCatalogy }) |
                        @Html.ActionLink("Delete", "Delete", new { id = item.IDCatalogy })
                        @*@Ajax.ActionLink("Delete", "Delete", "CatalogyManager", new { id = item.IDCatalogy }, new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "content", InsertionMode = InsertionMode.Replace, LoadingElementId = "loadingImage" })*@
                    </td>
                </tr>
            }
        </table>
    </div>
</div>
